# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=unrar
pkgver=5.9.4
pkgrel=0
pkgdesc="RAR uncompression program"
url="https://www.rarlab.com"
arch="all"
options="!check"  # No test suite.
license="custom"
subpackages="$pkgname-doc"
source="https://www.rarlab.com/rar/unrarsrc-$pkgver.tar.gz
	makefile.patch"
builddir="$srcdir/$pkgname"

build() {
	make CXX="${CXX:-g++}" STRIP=: -f makefile
}

package() {
	make DESTDIR="$pkgdir"/usr install

	install -Dm644 license.txt \
		"$pkgdir/usr/share/licenses/$pkgname/license.txt"
}

sha512sums="4c026bc12c38314c7df6e1b2f296be681fffa4ba525e378809063519cb5d51889fe8d3cbce16e802023354f02b45b1bcc672b79a6fa81b4baa13a374ce22c8f1  unrarsrc-5.9.4.tar.gz
2caa145c2fb1257c3cea1f552cba7bf8a3f8772c65c9751aad3fb5bec4957c7fefdb7bbb016c94b73d4778cef76460ddc2abafa8a12d09ebd24bcb6f1dcb263c  makefile.patch"
